<?php
require_once("isadmin.php");
require_once("config.php");
//page_constant("reg");
if(isset($_POST['title']))
{
	//var_dump($_POST);
	$uid=new UID();
	$injourney=$_POST;
	if(isset($_POST['id']))
		$uid->update("journey",$injourney,"id = ".$_POST['id']);
	else
		$uid->insert("journey",$injourney);
}

if(isset($_GET['id']))
{
	$dsql->SetQuery("select * from journey where id =".$_GET['id']);
	$dsql->Execute();
	while($row=$dsql->GetArray())
		$journey=$row;
	$tpl->assign("journey",$journey);
}
$tpl->display("journey.tpl");

?>